import request from '@/utils/http'
// import qs from 'qs'

export function menuList (params) {
  return request({
    url: '/menu/list',
    method: 'GET',
    params
  })
}

export function dict (params) {
  return request({
    url: '/commonDataInfo/dict',
    method: 'GET',
    params
  })
}

export function menuAdd (params) {
  return request({
    url: '/menu/add',
    method: 'POST',
    data: params,
    headers: {
      'Content-Type': 'application/json' // 设置为JSON格式
    }
  })
}

export function menuEdit (params) {
  return request({
    url: '/menu/update',
    method: 'POST',
    data: params,
    headers: {
      'Content-Type': 'application/json' // 设置为JSON格式
    }
  })
}

export function menuDelete(params) {
  return request({
    url: '/menu/delete',
    method: 'DELETE',
    data: params,
    headers: {
      'Content-Type': 'multipart/form-data' // 设置为JSON格式
    }
  })
}